<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePicturesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('pictures', function (Blueprint $table) {
            $table->increments('picture_id')->comment('主键');
            $table->integer('album_id')->comment('相册ID');
            $table->integer('user_id')->comment('用户ID');
            $table->string('user_name', 20)->comment('用户昵称');
            $table->timestamp('created_at')->comment('创建时间');
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('pictures');
    }
}
